
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	template="/pages/common/plantillaPrincipal.xhtml">

	<ui:define name="title">Registrar Alumno</ui:define>
	<ui:define name="cuerpo">
		<h:form id="form">
			<p:panel header="Registro">
				<p:panel>
					<h3>Registro</h3>
					<h:panelGrid columns="2" id="info">
						<h:outputLabel value="Codigo de Alumno : " />
						<p:inputText id="codigo" required="true"
							requiredMessage="Campo codigo" value="#{regAlum.codigo}" />
						<p:message for="codigo" />
						<h:commandButton value="Buscar" style="margin-top:12%"
							actionListener="#{regAlum.buscar}" />
						<h:outputLabel value="Nombres :" style="margin-top:12%" />
						<h:outputText value="#{regAlum.nombre}" />

						<h:outputLabel value="Apellidos :" style="margin-top:12%" />
						<h:outputText value="#{regAlum.apellido}" />

						<h:outputLabel value="Correo :" />
						<h:outputText value="#{regAlum.correo}" />


						<p:messages id="messages" showDetail="true" autoUpdate="true" />

					</h:panelGrid>
					<p:commandButton id="Registrar" type="button" value="registrar"
						onclick="dlg.show()" />

					<p:dialog header="ingrese password" widgetVar="dlg"
						resizable="false">
						<h:form id="form">

							<h:panelGrid columns="2" style="margin-bottom:10px">
								<h:outputLabel  value="password:" />
								<p:password id="password" value="#{regAlum.password}" />
								<h:outputLabel value="repetir password:" />
								<p:password id="pass_word" value="#{regAlum.password}"/>
							</h:panelGrid>

							<p:commandButton id="submitButto" value="aceptar" action="#{regAlum.agregar}"
								 oncomplete="dlg.hide()" update="form"  />

						</h:form>
					</p:dialog>
				</p:panel>


			</p:panel>

		</h:form>
	</ui:define>

</ui:composition>